/*
 * Copyright @ 2025 weili23
 * com.example.ai.assistant 16:19
 * All right reserved.
 */

package com.example.ai.assistant;

import dev.langchain4j.service.MemoryId;
import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.UserMessage;
import dev.langchain4j.service.spring.AiService;
import dev.langchain4j.service.spring.AiServiceWiringMode;
import reactor.core.publisher.Flux;

import static dev.langchain4j.service.spring.AiServiceWiringMode.EXPLICIT;


/**
 * @desc: 智医助手
 * @author: weili23
 * @createTime: 2025/4/30 16:19
 * @version: v1.0
 */
@AiService(
        wiringMode = EXPLICIT,
        //chatModel = "openAiChatLanguageModel", //配置使用模型
        streamingChatModel = "qwenStreamingChatModel", //配置使用流式模型输出
        chatMemoryProvider = "chatMemoryProviderZhiyi", //挂载存储记忆
        tools = "appointmentTools",  //挂载工具
        contentRetriever = "contentRetrieverZhiyi" //挂载知识库
)
public interface ZhiyiAssistant {
    @SystemMessage(fromResource ="xiaoyi-prompt-template.txt" )
    Flux<String> chat(@MemoryId Long memoryId , @UserMessage String userMessage);
}
